#include "WeaponManager.h"


WeaponManager::WeaponManager() {
}
WeaponManager::~WeaponManager() {
}

void WeaponManager::initialize() {
	m_image_Shotgun = new sf::Texture();
	m_image_Shotgun->loadFromFile("bilder/weapons/shotgun.png");
	m_image_Machinegun = new sf::Texture();
	m_image_Machinegun->loadFromFile("bilder/weapons/ak47.png");


}

void WeaponManager::addShotgun(sf::RenderWindow* m_renderWindow, EnemyManager* enyman)
{
	Shotgun shotgunObj;
	shotgunObj.Initialize(m_renderWindow,  enyman, m_image_Shotgun);
	m_arrayOfShotguns.push_back(shotgunObj);
}

void WeaponManager::addMachinegun(sf::RenderWindow* m_renderWindow, EnemyManager* enyman)
{
	Machinegun machinegunObj;
	machinegunObj.Initialize(m_renderWindow,  enyman, m_image_Machinegun);
	m_arrayOfMachineguns.push_back(machinegunObj);
}



void WeaponManager::update() {
	for(int i = 0; i < m_arrayOfShotguns.size(); i++) {
		m_arrayOfShotguns[i].Update();

	}


	for(int i = 0; i < m_arrayOfMachineguns.size(); i++) {
		m_arrayOfMachineguns[i].Update();

	}


}



void WeaponManager::cleanup() {

}
